package com.baidu.automata.core.type;

import org.dom4j.Element;
import org.w3c.dom.Node;

public abstract class DataField {
	protected String id = null;

	public DataField() {
		super();
	}

	public DataField(String id) {
		super();
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	/**
	 * 反序列化
	 * 
	 * @param dataNode
	 */
	public abstract void deserialize(Element e) throws Exception;

	/**
	 * 序列化
	 * 
	 * @return
	 */
	public abstract Node serialize() throws Exception;
}
